<?php
/**
 * Created by PhpStorm.
 * User: ZhangWei
 * Date: 2018/4/13
 * Time: 18:01
 */

namespace App\Admin;


use Illuminate\Support\MessageBag;

trait BaseAdmin
{
    public function error($message)
    {
        $error = new MessageBag([
            'title' => '提示',
            'message' => $message,
        ]);

        return back()->with(compact('error'));
    }
    public function success($message)
    {
        $success = new MessageBag([
            'title' => '提示',
            'message' => $message,
        ]);

        return back()->with(compact('success'));
    }

}